package com.kylin.domain;

import com.kylin.domain.oauth2.social.wechat.connect.WechatServiceProvider;
import lombok.RequiredArgsConstructor;
import org.junit.jupiter.api.Test;

import java.util.Arrays;

/**
 * 通用功能测试类
 * @author Damon S.
 * @version v1.0.1
 * @date 2019年12月05日 10:58
 */
@RequiredArgsConstructor
public class CommonFunctionTester {

    private final WechatServiceProvider provider;

    @Test
    void testReturnStreamForEach() {
        Arrays.asList(1, 2, 3, 4, 5, 6).forEach(num -> {
            if (3 == num % 4) {
//                throw new SystemException("异常信息");
                return;
            }
            System.out.print(num + ", ");
        });
    }

    @Test
    void testWechatRequestSession() throws Exception {
    }
}
